From: Claudio Cambra Date: Thu, 5 Dec 2024 07:50:16 +0000 (+0800) Subject: mac-crafter: Only attempt sparkle codesign if it exists in the app bundle X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~30^2^2~208^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=154cb1cdc6f40b7845e4aefa25c155bfb0fbc466;p=nextcloud-desktop.git mac-crafter: Only attempt sparkle codesign if it exists in the app bundle Signed-off-by: Claudio Cambra --- diff --git a/admin/osx/mac-crafter/Sources/Utils/Codesign.swift b/admin/osx/mac-crafter/Sources/Utils/Codesign.swift index 4b2341274..b511f0a44 100644 --- a/admin/osx/mac-crafter/Sources/Utils/Codesign.swift +++ b/admin/osx/mac-crafter/Sources/Utils/Codesign.swift @@ -123,14 +123,21 @@ func codesignClientAppBundle( // Multiple components of the app will now have the get-task-allow entitlements. // We need to strip these out manually. - print("Code-signing Sparkle autoupdater app (without entitlements)...") let sparkleFrameworkPath = "\(frameworksPath)/Sparkle.framework" - try recursivelyCodesign(path: "\(sparkleFrameworkPath)/Resources/Autoupdate.app", - identity: codeSignIdentity, - options: "--timestamp --force --verbose=4 --options runtime --deep") + if FileManager.default.fileExists(atPath: "\(sparkleFrameworkPath)/Resources/Autoupdate.app") { + print("Code-signing Sparkle autoupdater app (without entitlements)...") - print("Re-codesigning Sparkle library...") - try codesign(identity: codeSignIdentity, path: "\(sparkleFrameworkPath)/Sparkle") + try recursivelyCodesign( + path: "\(sparkleFrameworkPath)/Resources/Autoupdate.app", + identity: codeSignIdentity, + options: "--timestamp --force --verbose=4 --options runtime --deep" + ) + + print("Re-codesigning Sparkle library...") + try codesign(identity: codeSignIdentity, path: "\(sparkleFrameworkPath)/Sparkle") + } else { + print("Build does not have Sparkle, skipping.") + } print("Code-signing app extensions (removing get-task-allow entitlements)...") let fm = FileManager.default